<script type="text/javascript" src="{$base_dir}modules/dept_rad/js/AJAX_XRayResult.js"></script>
<script src="{$base_dir}js/jquery.lightbox-0.5.min.js" type="text/javascript"></script>
<link type="text/css" rel="stylesheet" href="{$base_dir}/css/jquery.lightbox-0.5.css"/>
<script type="text/javascript">
<!--
{literal}
    $(document).ready(function(){      
          // Add date picker
          //addDatePickerTime("#created_dd", '#created_mm', '#created_yyyy', '#createdTime', false, false, true);
          
          $('#radTicketItemListLbx').change(function(){
                loadItemResultView();
          });
          
          $('#additionalServiceCol input[type=\'checkbox\']').attr('disabled', 'disabled');
          
          $('#radTicketItemListLbx option:first').attr("selected","selected");
          
          loadItemResultView();
          
    });
{/literal}
//-->
</script>
<table style="width: 100%; border-top: none;" cellpadding="0" cellspacing="0" class="grid">
    <tr class="last">                     
        <td valign="top"  class="form_label" style="text-align: left; width: 230px;">
            <select style="width: 230px;" size="12" id="radTicketItemListLbx" name="radTicketItemListLbx"> 
                {html_options options=$radTicketItemList}       
            </select>
        </td>
        <td style="padding-top: 7px;" valign="top">
            <form id="commonDataFrm">
            <table cellspacing="0" cellpadding="0" class="grid" style="width: 100%">
                <caption><span id="serviceName"></span>&nbsp;</caption>
                <tbody>
                    <tr>
                        <td style="width: 120px;" class="form_label">{translate}Treatment doctor{/translate}</td>
                        <td class="form_input"><span>{$treatmentDoctorName}</span></td>
                        <td style="width: 130px;" class="form_label">{translate}Pre-diagnosis{/translate}</td>
                        <td class="form_input" style="width: 220px;"><div>{$preDiagnosis}</div></td>
                    </tr>
                    <tr>
                        <td class="form_label">{translate p1=1}Dr/Technician %s{/translate}</td>
                        <td class="form_input">
                             <span id="technicianId1"></span>
                        </td>
                        <td class="form_label">{translate}Executed time{/translate}</td>
                        <td class="form_input">
                            <span id="created"></span>
                        </td>
                    </tr>
                    <tr>
                        <td class="form_label">{translate p1=2}Dr/Technician %s{/translate}</td>
                        <td class="form_input"><span id="technicianId2"></span></td>
                        <td class="form_label">{translate}Machine{/translate}</td>
                        <td class="form_input"><span id="machine"></span></td>                   
                    </tr>
                    <tr class="last">
                        <td class="form_label">{translate}Radiology doctor{/translate}</td>
                        <td class="form_input">
                           <span id="doctorName"></span>
                        </td>
                        {if isset($additionalServiceList)}
                        <td class="form_label">{translate}Additional service{/translate}</td>
                        <td class="form_input" id="additionalServiceCol">
                            {html_checkboxes name="additionalServices" options=$additionalServiceList separator="<br/>"}
                        </td>
                         {else}
                        <td colspan="2" class="form_input">&nbsp;</td>
                        {/if}
                    </tr>
                    
                </tbody>
            </table>
            </form>
        </td>   
    </tr>
</table>

<div style="height: 10px;"></div>

<div id="radConclusionDiv">
    <table style="width: 100%;" cellpadding="0" cellspacing="0">
        <tr>
            <td valign="top" style="width: 405px;">
                <form id="conclusionFrm">
                <table class="grid" cellspacing="0" cellpadding="0" style='width: 98%'>
                    <tbody>
                        <tr>
                            <td class='form_label' style='text-align: left'>{translate}Description{/translate}</td>
                        </tr>
                        <tr>
                            <td class='form_input' style='height: 120px; width: 100%; vertical-align: top;'>
                                <div  id="description" style="vertical-align: top;"></div>
                            </td>
                        </tr>
                        <tr>
                            <td class='form_label' style='text-align: left'>{translate}Conclusion{/translate}</td>
                        </tr>
                        <tr class='last'>
                            <td class='form_input' style='height: 50px; width: 100%; vertical-align: top;'>
                                <div id="conclusion" style="vertical-align: top;"></div>
                            </td>
                        </tr>
                    </tbody>
                </table>
                </form>
            </td>
            <td valign="top">
                <div class='upload_panel'>
                    <span style='font-style: italic; padding-bottom: 5px;'>{translate}Images{/translate}</span>
                </div>
                <div id="radImageListDiv">
                    
                </div>
            </td>
        </tr>
    </table>
</div>
    
<div id="itemResultLoaderDiv" style="display: none; position: fixed; top: 0px; left: 0px; height: 100%; width: 100%; z-index: 1000">
    <div style="overflow: hidden; background-color: #000; position: absolute; top: 0px; left: 0px; height: 100%; width: 100%; opacity: 0.2;">
    </div>
    <div style='padding: 6px 0px 0px 6px; position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; background: #F5F5F5; border: 3px solid #CCC; margin-left: -20px; margin-top: -30px;'>
        <img src="{$base_uri}/images/ajax-loader.gif"/>
    </div>
</div>